var $ = getApp(), methods = require("../../methods.js");
Page(Object.assign({}, methods, {
	data: {
        type:1,
        kfewm:'',
        kftel:"",
        showbox:false,
		datalist: [],
		pagenum: 1,
	},
	_onLoad:function(){
		var that = this
        $.get('yuxun/apply', { }, function (res) {
            if(res.isok==1){
                wx.redirectTo({
                  url: 'my',
                })
            }else{
                that.setData({kfewm:res.kfewm,kftel:res.kftel,showbox:true});
            }
        });
    },
    chooseChange:function(e){
        console.log(e)
        this.setData({type:e.currentTarget.dataset.type})
    },
    tijiao:function(e){
        // var that = this;
        // var type = that.data.type;
        // $.get('yuxun/apply', {type:type }, function (res) {
        //     that.setData(res);
        // });
        this.setData({showbox:true});
    },
    hidebox:function(){
        this.setData({showbox:false});
    }
}))